<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>星座</title>
	</head>
	<body>
		<script>
			 
			 var month=prompt("请输入出月份");
			 var day=prompt("请输入出日期");
			 
			 if((month==1&&day>=20&&day<=31)||(month==2&&day>0&&day<=18)){
			 	alert("水瓶座");
			 }
			 
			 else if((month==2&&day>=19&&day<=29)||(month==3&&day>0&&day<=20)){
			 	alert("双鱼座");
			 }
			 
			 else if((month==3&&day>=21&&day<=31)||(month==4&&day>0&&day<=19)){
			 	alert("白羊座");
			 }
			 else if((month==4&&day>=20&&day<=30)||(month==5&&day>0&&day<=20)){
			 	alert("金牛座");
			 }
			 else if((month==5&&day>=21&&day<=31)||(month==6&&day>0&&day<=21)){
			 	alert("双子座");
			 }
			 else if((month==6&&day>=22&&day<=30)||(month==7&&day>0&&day<=22)){
			 	alert("巨蟹座");
			 }
			 else if((month==7&&day>=23&&day<=31)||(month==8&&day>0&&day<=22)){
			 	alert("狮子座");
			 }
			 else if((month==8&&day>=23&&day<=31)||(month==9&&day>0&&day<=22)){
			 	alert("处女座");
			 }
			 else if((month==9&&day>=23&&day<=30)||(month==10&&day>0&&day<=23)){
			 	alert("天秤座");
			 }
			 else if((month==10&&day>=24&&day<=31)||(month==11&&day>0&&day<=22)){
			 	alert("天蝎座");
			 }
			 else if((month==11&&day>=23&&day<=30)||(month==12&&day>0&&day<=21)){
			 	alert("射手座");
			 }
			 else if((month==12&&day>=22&&day<=31)||(month==1&&day>0&&day<=19)){
			 	alert("摩羯座");
			 }
			 else{
			 	alert("输入有误！");
			 }
			 
		</script>
	</body>
</html>
